<template>
	<div class="z_tree">
      <ul id="tree" class="ztree" style=" overflow:auto;">
  
      </ul>
  </div>
</template>
<script>
import $ from 'jquery' 
import '@/components/ztree/js/jquery.ztree.core' 
var nodes = [
	{name: "父节点1", children: [
		{name: "子节点1"},
		{name: "子节点2"}
	]}
];
export default{
	data(){
		return{
			setting:{
			  view: {
			    dblClickExpand: false
			  },
			  data: {
			    key : {
			    name : "menuname"
			    },
			    simpleData : {
			      enable : true,
			      idKey : "menuid",
			      pidKey : "menuparentid",
			      rootPid : 0
			    }
			  }
			}
		}
	},
	mounted(){
	    $.fn.zTree.init($("#tree"), this.setting, nodes);
	}
}
</script>
<style lang="scss">
 @import "./zTreeStyle";
</style>